import service from '@/utils/request'

export const getBusinessAPI = params => service.get('park/enterprise', { params })

export const getIndustryListAPI = () => service.get('park/industry')

export const uploadAPI = data => service.post('/upload', data)

export const createEnterpriseAPI = data => service.post('/park/enterprise', data)
// 删除
export const delBusinessAPI = id => service.delete(`/park/enterprise/${id}`)
// 查询详情
export const getBusinessDetialAPi = id => service.get(`park/enterprise/${id}`)
// 修改详情
export const updateBuinessAPI = data => service.put('/park/enterprise', data)
// 获取楼宇下拉框列表
export const getRentBuildListAPI = () => service.get('/park/rent/building')
// 创建租赁合同
export const createRentAPI = data => service.post('park/enterprise/rent', data)
// 获取租赁列表
export const getRentListAPI = id => service.get(`park/enterprise/rent/${id}`)
// 退租
export const outRentAPI = id => service.put(`park/enterprise/rent/${id}`)
// 下载
export const downLoadAPI = id => service.get(`download/${id}`, { responseType: 'blob' })
// 删除合同
export const delRentAPI = id => service.delete(`park/enterprise/rent/${id}`)
